package com.cmiov.pulsar.pulsardemo;

import io.swagger.annotations.Api;
import org.apache.pulsar.client.api.Producer;
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * * Licensed to CMDT,Inc. under the terms of the CMDT
 * Software License version 1.0.
 * <p>
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 * ----------------------------------------------------------------------------
 * Date           Author               Version        Comments
 * 18-12-22       joe chow                 1.0            Initial Version
 */
@RestController("/pulsar")
@Api("/pulsar")
public class DemoApi {

    @Autowired
    private PulsarDemoService demoService;

    @GetMapping("/demo")
    public void demo() throws PulsarClientException {
        demoService.demo();
    }
}
